<?php
    require ('classes/DBManager.php');
    $stat_id = $_GET['stat_id'];
    $cl_id = $_GET['cnt_id'];
    $query = "UPDATE bazkl_contacts set status=".$stat_id." WHERE id=".$cnt_id;
    $result = DBManager::executeUpdateInsert($query);
    
    if( $result ) {
        $query = "SELECT cst_background FROM pgbhr_client_status WHERE cst_id=".$stat_id;
        $result = DBManager::getArrayData($query);
        $data = $result[0];
        extract($data, EXTR_OVERWRITE);
        echo $cst_background;
    } else {
        echo "no";
    }
?>
